<?php get_header(); ?>

        <!-- Container Begin-->
        <div class="container">
        	<div class="containerTop"></div>
        	<div class="containerContent">
            <!-- Content Begin-->
            <div class="content">
                <div class="breadcrumb">
					当前位置: <a href="<?php echo get_settings('home'); ?>/" title="首页">首页</a> 
				</div>

<?php if(is_category('products')):?>

<!--Gallery列表开始-->
<div class="products" style="width:auto;padding-top:8px;">
<ul>
		<?php if (have_posts()) : ?>		
		<?php while (have_posts()) : the_post(); ?>
				
				<li id="post-<?php the_ID(); ?>">
				<a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>">
				<?php 
				$product_id	= get_the_ID();
				$product_pic = get_post_meta($product_id, 'product_pic',true);
				if ($product_pic == ''):
				$product_pic = "http://www.hzlixiu.com/wp-content/uploads/2010/04/1252451022-4119.jpg";
				endif;
				?>
				<img src="<?php echo $product_pic;?>" class="attachment-small wp-post-image" alt="<?php the_title_attribute(); ?>"/></a>
				<a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
				</li>				
		<?php endwhile; ?> 

	<?php else : ?>
		Not Found
		<?php include (TEMPLATEPATH . '/searchform.php'); ?>
	<?php endif; ?>
</ul>

<div class="clear"></div>
<div class="pageNavi">
	<div class="wp-pagenavi">
		<span><?php next_posts_link(__('下一页', 'enterprise')); ?></span>
		<span ><?php previous_posts_link(__('上一页', 'enterprise')); ?></span>
	</div>
</div>

</div>    
<!--Gallery列表结束-->

<?php else:?>
<!--默认列表开始-->
<div class="posts">
<ul class="postlist">
		<?php if (have_posts()) : ?>		
		<?php while (have_posts()) : the_post(); ?>			
				<li id="post-<?php the_ID(); ?>">
				<a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a><span class="post-time"><?php the_time('Y-m-n')?></span>
				</li>				
		<?php endwhile; ?>

	<?php else : ?>
		Not Found
		<?php include (TEMPLATEPATH . '/searchform.php'); ?>
	<?php endif; ?>
</ul>

<div class="clear"></div>
<div class="pageNavi">
	<div class="wp-pagenavi">
		<span><?php next_posts_link(__('下一页', 'enterprise')); ?></span>
		<span ><?php previous_posts_link(__('上一页', 'enterprise')); ?></span>
	</div>
</div>
</div>    
<!--默认列表结束-->
				
<?php endif;?>

                               
            </div>

            <!-- Content end-->
        <?php get_sidebar(); ?>
    	</div>
    </div>
    <!-- Container end-->


<!--include footer-->
<?php get_footer(); ?>
